package com.dnjn.happiness.biz.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.annotation.Excel;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 建议分配表对象 biz_advice_assign
 *
 * @author happiness
 * @date 2023-10-16
 */
@Schema(name = "AdviceAssign", description = "建议分配表")
@Accessors(chain = true)
@Getter
@Setter
@TableName("biz_advice_assign")
public class AdviceAssign extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** PK */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    
    

    /** $column.columnComment */
    @Schema(description = "${comment}")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String fromUsername;

    /** $column.columnComment */
    @Schema(description = "${comment}")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String toUsername;

    /** $column.columnComment */
    @Schema(description = "${comment}")
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long adviceId;

    /** 更新时间 */
    private Date updateTme;

    /** 是否删除|0-否 1-是|valid */
    private String deleted;


    /**
     * 这令个是根据前端需要加的
     * @return
     */
    @TableField(exist = false)
    private String sysFromUserName;
    @TableField(exist = false)
    private String sysTousername;






    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("fromUsername", getFromUsername())
                .append("toUsername", getToUsername())
                .append("adviceId", getAdviceId())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTme", getUpdateTme())
                .append("deleted", getDeleted())
                .append("version", getVersion())
                .toString();
    }
}
